Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added keepAlive option. #290

Merged
merged 1 commit into from
Dec 30, 2013
Merged

Added keepAlive option. #290

merged 1 commit into from
Dec 30, 2013

Conversation

spake
Copy link
Contributor

@spake spake commented Dec 10, 2013

There is an issue with the use of the latest version of Selenium with PhantomJS & GhostDriver in that Selenium was recently changed to use keep-alive for remote connections, now assuming that the WebDriver connection supports keep-alive and that it can leave the socket open. Unfortunately, by default, keep-alive is disabled in PhantomJS, creating an issue when the two are used together in which GhostDriver closes the HTTP connection while Selenium has requested it remain open.

I've developed a fix in the form of adding a command line argument to PhantomJS that enables keep-alive in GhostDriver. This is the first part of that fix in the form of adding a keepAlive option to GhostDriver that can be called from PhantomJS based on the value of the command line argument.

I assume the protocol would be to get this merged to ghostdriver/master, wait for the changes to be added to the PhantomJS repo, and then submit a pull request on the PhantomJS repo for the changes involving the command line argument. Any clarification on the process would be appreciated 😄

@maestrofjp
Copy link

+1 on this pull request as it is a blocker for us using Selenium, GhostDriver and PhantomJS in our Django test suites. Now having to fall back on Firefox. ;-(

@detro
Copy link
Owner

detro commented Dec 30, 2013

Looking into this now...

detro added a commit that referenced this pull request Dec 30, 2013
Added `keepAlive` capability.
@detro detro merged commit 04fa6c0 into detro:master Dec 30, 2013
@detro
Copy link
Owner

detro commented Dec 30, 2013

I have removed the capability as this is not necessary: enabling support for "keep alive" doesn't force it to the RemoteWebDriver clients.

@spake spake deleted the keepalive branch December 30, 2013 22:36
AkeemMcLennon pushed a commit to AkeemMcLennon/ghostdriver that referenced this pull request Feb 23, 2015
CHANGELOG for v1.1.0 (https://github.com/detro/ghostdriver/issues?labels=1.1.0&state=closed)

JavaScript Driver (Core)
* ENHANCEMENT: `/maximize` window will set the window size to 1336x768,
currently most common resolution online (see http://gs.statcounter.com/#resolution-ww-monthly-201307-201312)
* ENHANCEMENT detro#275: Implemented Browser and Network (HAR) Logging types
* FIXED #284: Attempt to wait for Page to Load if input causes form submit
* FIXED #291: Throw exception when attempting to set invalid timeout value
* FIXED detro#259: Fix issue regarding mouse clicks
* ENHANCEMENT detro#290: Enabled support for "Keep Alive" HTTP connections
* ENHANCEMENT detro#262: Allow access to PhantomJS API from WebDriver (Driver part)
* ENHANCEMENT #293: Import Selenium 2.39.0 WebDriver Atoms

Java Binding
* MINOR detro#251: Minor compilation issues for Binding
* ENHANCEMENT detro#262: Allow access to PhantomJS API from WebDriver (Java Binding part)

Tested using GhostDriver validation tests (https://github.com/detro/ghostdriver/tree/master/test).

ariya/phantomjs#11877
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants